package cn.calm.xhtml.impl.fun;

import cn.calm.xhtml.annotation.Attribute;
import cn.calm.xhtml.annotation.Tag;
import cn.calm.xhtml.api.exception.XhtmlException;
import cn.calm.xhtml.api.service.AbstraceNodeProcess;
import cn.calm.xhtml.api.service.XhtmlContext;
@Tag(namespace = "http://www.calm.cn/xhtml/extras/core", attributes = {
		@Attribute(name = "value", description = "表达式", template = "<label></label><input name=\"value\"/>")})
public class If extends AbstraceNodeProcess {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public void processNode(XhtmlContext context) throws XhtmlException {
		Object value = getAttrValue("value", context);
		if(value==null){
			return ;
		}
		Boolean b=(Boolean) value;
		if(b){
			processChildren(context);
		}
	}

}
